home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
demos
/
a-d
/
blitzbasic21
/
examples
/
cd32lib
/
cd32lib.doc
< prev
next >
Wrap
Text File
|
1995-09-25
|
3KB
|
111 lines
;
; place the cd32lib.obj in blitz2:userlibs/beta/ then read this...
;
#cd32lib=113
WriteCD32Mem (AppName$,FileName$,Address,Length/10)
ReadCD32Mem (AppName$,FileName$,Address,Length/10)
InitCD32
ExamineCD32
PlayCD32 track#[,numtracks]
StopCD32
ControlCD32
TocCD32
ConfigCD32 [&TagList]
ReadCD32 (CD_Offset,Address,Length)
Overview of CD32 library for Blitz2
-----------------------------------
The cd32lib provides a simple interface to controlling the
cd32's audio and nonvolatile memory features.
Only a subset of the commands will be required for developers
porting their games to CD32, the rest are only useful for
general AudioCD player type software.
Nonvolatile Memory
------------------
To store a games highscore table in CD32 memory the author
must first transfer the data to a sequential segment of
RAM and then use the WriteCD32Mem command which handles
data in multiples of 10 bytes.
See the test.bb example in this directory for an example.
Playing Audio Tracks
--------------------
Instructing the CD32 to play an audio track is simply a
matter of using the PlayCD32 command.
The InitCD32 command should however be used first, and
if the result is false (ie software is NOT running on
CD32) your software should not call any other CD32
commands.
Unlike the CD32Mem commands we have found that the CD32
audio commands can be used in Blitz mode, although if
things start going weird....
Function: InitCD32
If InitCD32 returns true then it is ok to use the following
commands, if false then no there is no cd32 or compatible
available so don't even try.
Function: ExamineCD32 ;-1=programdisk 0=nodisk n=number of tracks
ExamineCD32 is useful for programs that allow disk swapping,
it can be used to ensure the programdisk that the game was run
from is present, or if there is no disk or if a standard music
CD has been inserted. It is feasible that you allow users to
play music cd's while playing you game and then be able to ask
them to insert the game disk when more data is required.
PlayCD32 track#[,numtracks]
Makes the CD32 go boom tiddly pom depending on what type of
music track is specified... ie should/will/definately play
start the CD32 playing the track sprecified.
StopCD32
No explanation necesary, well it is sort of self explanatory...
ControlCD32 ;0=play 1=pause 2=ffwd 3=rewind
Yup, pretty straight forward here.
TocCD32 ;returns location of the toc read by Examine
Hmmm, demo code required here. After using the ExamineCD32 command
you can find out the length of each track by examining the TOC data
(Table Of Contents) a sort of Audio CD directory command.
ConfigCD32 [&TagList] ;can return ¤tconfig
Tags are available for 2x speed and 1xspeed and other things.
Interesting to note any CD can be turned into the chipmunk
edition by telling CD32 to switch to 2xspeed and then using
playtrack, or was that playtrack and then 2xspeed... Anyway
it does work.
ReadCD32 (CD_Offset,Address,Length)
Wo, only good for lowlevel people who want to protect their
software in more ways than one. Using commands like this will
definately make your game non hard drive installable.